home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
cpp_libs
/
answrbok
/
3_5.lha
/
3_5
/
3_5a1.c
next >
Wrap
Text File
|
1993-08-08
|
379b
|
17 lines
* Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
* The C++ Answer Book */
* Tony Hansen */
* All rights reserved. */
/ exercise division by zero
include <stream.h>
nt x() { return 0; }
nt main(int, char**)
short int i = 1;
short int j = x();
short int k = i / j; // divide by 0
cout << i << " / " << j << " = " << k << "\n";
return 0;